<?php
	global $current_controller;

	echo "
	 <!-- Bottom  -->
	 <tr class='bg_bottom'>
	 	<td height='60'><img src='".SITE_IMAGES."vid.gif' alt='' /></td>
	  	<td valign='middle'>
	   		<table border='0' cellspacing='0' cellpadding='0' width='100%'>
	   			<tr>
				    <td align='left'>
				    	<span class='c84 size12'>&copy;2011 Markedd.com. All rights reserved.</span><br />
				    	<span class='c84 size12'>".Language::Get('Developed by')." <a href = 'http://www.developer.md/' target = '_blank' style = 'color: #000000; font-weight: bold; '>DeveloperMD</a></span>
				    </td>
				    <td style='padding: 10px;'>
				    	<span id='clock' style='color: #000000; font-size: 12px; font-weight: bold; float:right; '>&nbsp;</span>
				    </td>

	    			<td align='right' width='500'>";
	
	    				foreach (Menus::$site_global as $key => $menu)
	    				{
	    					if ((($menu['in_footer'] == false) || ($menu['is_private'] == true) && (empty(HTTPContext::$session['client']))
	    						|| ($menu['is_public'] == true) && (!empty(HTTPContext::$session['client']))
	    						|| ($menu['text'] == Language::Get('Register') && $current_controller->page_title == Language::Get('Registration')))
	    						&& (!($menu['in_footer_private'] === true) || empty(HTTPContext::$session['client'])))
	    						{
	    							continue;
	    						}
	    					if (!($menu['in_footer_private'] === true) && !empty(HTTPContext::$session['client'])) continue;	
	    					
	    					$cssClass = ($key == $this->menuItem) ? 'menu_bottom_sel' : '';
							echo "<div class='menu_bottom $cssClass'><a href='{$menu['url']}' onclick = '{$menu['onclick']}'>{$menu['text']}</a></div>";    				
	    				}
	echo " 				
					</td>
	   			</tr>
	   			<tr> 
	   				<td colspan='2' align='center'>  </td>
	   			</tr>
	   		</table> 
	   		 
	  	</td>
	  	<td><img src='".SITE_IMAGES."vid.gif' alt='' /></td>
	 </tr> 
	 <!-- end Bottom  -->
    ";
	
?>
<script type="text/javascript">

//footer clock
function updateClock ( )
{
  var currentTime = new Date ( );

  var currentHours = currentTime.getUTCHours ( );
  var currentMinutes = currentTime.getUTCMinutes ( );
  var currentSeconds = currentTime.getUTCSeconds ( );

  // Pad the minutes and seconds with leading zeros, if required
  currentMinutes = ( currentMinutes < 10 ? "0" : "" ) + currentMinutes;
  currentSeconds = ( currentSeconds < 10 ? "0" : "" ) + currentSeconds;

  // Choose either "AM" or "PM" as appropriate
  var timeOfDay = ( currentHours < 12 ) ? "AM" : "PM";

  // Convert the hours component to 12-hour format if needed
  currentHours = ( currentHours > 12 ) ? currentHours - 12 : currentHours;

  // Convert an hours component of "0" to "12"
  currentHours = ( currentHours == 0 ) ? 12 : currentHours;

  // Compose the string for display
  var currentTimeString = "UTC " + currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;

  // Update the time display
  document.getElementById("clock").firstChild.nodeValue = currentTimeString;
}

</script>